<!--?xml version="1.0" encoding="UTF-8"?-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" xml:lang="en" lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Checkout</title>
<!-- base href="http://template-preview.com/opencart/300111402/" -->
<link href="http://template-preview.com/opencart/300111402/image/data/cart.png" rel="icon">
<link rel="stylesheet" type="text/css" href="checkout/stylesheet.css">
<script type="text/javascript" src="checkout/jquery-1.js"></script>
<script type="text/javascript" src="checkout/jquery-ui-1.js"></script>
<link rel="stylesheet" type="text/css" href="checkout/jquery-ui-1.css">
<script type="text/javascript" src="checkout/jquery.js"></script>
<script type="text/javascript" src="checkout/jquery_002.js"></script>
<link rel="stylesheet" type="text/css" href="checkout/jquery.css" media="screen">
<!--[if IE]>
<script type="text/javascript" src="catalog/view/javascript/jquery/fancybox/jquery.fancybox-1.3.4-iefix.js"></script>
<![endif]--> 
<script type="text/javascript" src="checkout/tabs.js"></script>
<script type="text/javascript" src="checkout/common.js"></script>

<script type="text/javascript" src="checkout/jcarousellite.js"></script>
<script type="text/javascript">	$(function() { $(".carousel").jCarouselLite({ btnNext: ".next", btnPrev: ".prev" }); }); </script>

<script type="text/javascript">
	$(document).ready(function() {
		/*SOCIAL*/		
		$('div.social a').animate({'opacity':'0.5'}, 50);
		$('div.social a').hover( 
		function(){
			$(this).animate({'opacity':'1'}, 200);
		}, function(){
			$(this).animate({'opacity':'.5'}, 200);					  
		});
			
		$(window).load(function() { 
		  $('#menu ul').fadeIn(120);
		})
		
		$('.box-product ul li > div, .product-grid > div, .box-product > div').hover( 
		function(){
			$(this).find('.open_content').fadeIn(300);
		}, function(){
			$(this).find('.open_content').fadeOut(200);
		});

		$('#menu ul li').has('div').addClass('arrow_down');
		$('.box-category > ul > li').has('ul').addClass('cat_arrow_down');
		$('.box-product > div:last').css({'margin-right':'0'});
		$('body').has('.phone').addClass('homa');

		$(window).load(function() { 
			$('#content').wrapInner(document.createElement('span'));
			$("#content > span > .breadcrumb + h1").insertBefore("#content > span");
		})

/*		$('#column-left').css('min-height', $('#content').height());
			$('#content').css('min-height', $('#column-left').height());
	$('#column-right').css('min-height', $('#content').height() );
	    $('#content').css('min-height', $('#column-right').height());
*/
	});

</script>	
<!--[if ! IE]-->					   
<script type="text/javascript">
	$(document).ready(function() {

	});
</script>						   
<!--[endif]-->


<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie7.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo img');
</script>
<![endif]-->
</head>
<body>
<div class="bg_bottom">
<div class="bg_top">
<div id="container">
<div id="header">
    <div id="logo"><a href="http://template-preview.com/opencart/300111402/index.php?route=common/home"><img src="checkout/logo.png" title="Your Store" alt="Your Store"></a></div>
        <form action="http://template-preview.com/opencart/300111402/index.php?route=common/home" method="post" enctype="multipart/form-data">
    <div id="currency"><span>Currency :</span>
                        <a title="Euro" onclick="$('input[name=\'currency_code\']').attr('value', 'EUR').submit(); $(this).parent().parent().submit();">€</a>
                                    <a title="Pound Sterling" onclick="$('input[name=\'currency_code\']').attr('value', 'GBP').submit(); $(this).parent().parent().submit();">£</a>
                                    <a title="US Dollar"><b>$</b></a>
                        <input name="currency_code" value="" type="hidden">
      <input name="redirect" value="http://template-preview.com/opencart/300111402/index.php?route=checkout/checkout" type="hidden">
    </div>
  </form>
    <div id="cart">
    <div class="heading">
      <h4>Shopping Cart</h4>
      <a><span id="cart_total">1 item(s) - $120</span></a></div>
    <div class="content"></div>
  </div>
  <div id="search">
    <div class="button-search"></div>
        <input name="filter_name" value="Search" onclick="this.value = '';" onkeydown="this.style.color = '#dcba99';" type="text">
      </div>
  <div id="welcome">
        Welcome visitor you can <a href="http://template-preview.com/opencart/300111402/index.php?route=account/login">login</a> or <a href="http://template-preview.com/opencart/300111402/index.php?route=account/register">create an account</a>.      </div>
  <div class="links"><a href="http://template-preview.com/opencart/300111402/index.php?route=common/home">Home</a><a href="http://template-preview.com/opencart/300111402/index.php?route=account/wishlist" id="wishlist_total">Wish List (0)</a><a href="http://template-preview.com/opencart/300111402/index.php?route=account/account">My Account</a><a href="http://template-preview.com/opencart/300111402/index.php?route=checkout/cart">Shopping Cart</a><a href="http://template-preview.com/opencart/300111402/index.php?route=checkout/checkout">Checkout</a></div>
<div id="menu">
  <ul style="display: block;">
        <li><a href="http://template-preview.com/opencart/300111402/index.php?route=product/category&amp;path=61">Books</a>
          </li>
        <li><a href="http://template-preview.com/opencart/300111402/index.php?route=product/category&amp;path=59">e-books</a>
          </li>
        <li class="arrow_down"><a href="http://template-preview.com/opencart/300111402/index.php?route=product/category&amp;path=20">Children</a>
            <div style="">
                <ul style="">
                                        <li><a href="http://template-preview.com/opencart/300111402/index.php?route=product/category&amp;path=20_45">Early Readers (2)</a></li>
                                        <li><a href="http://template-preview.com/opencart/300111402/index.php?route=product/category&amp;path=20_46">Family &amp; Growing Up (4)</a></li>
                                        <li><a href="http://template-preview.com/opencart/300111402/index.php?route=product/category&amp;path=20_62">Fantasy &amp; Magic (3)</a></li>
                                        <li><a href="http://template-preview.com/opencart/300111402/index.php?route=product/category&amp;path=20_28"> Food (5)</a></li>
                                        <li><a href="http://template-preview.com/opencart/300111402/index.php?route=product/category&amp;path=20_29">Humor (3)</a></li>
                                        <li><a href="http://template-preview.com/opencart/300111402/index.php?route=product/category&amp;path=20_26">Romance (5)</a></li>
                                        <li><a href="http://template-preview.com/opencart/300111402/index.php?route=product/category&amp;path=20_27">Classics (3)</a></li>
                            </ul>
              </div>
          </li>
        <li><a href="http://template-preview.com/opencart/300111402/index.php?route=product/category&amp;path=60">Cookbooks</a>
          </li>
        <li><a href="http://template-preview.com/opencart/300111402/index.php?route=product/category&amp;path=18">Magazines</a>
          </li>
        <li><a href="http://template-preview.com/opencart/300111402/index.php?route=product/category&amp;path=25">Medicine</a>
          </li>
      </ul>
</div>
</div>

<div id="notification"></div>
<div class="bg_content"> 
<div id="content"><h1>Checkout</h1><span>  <div class="breadcrumb">
        <a href="http://template-preview.com/opencart/300111402/index.php?route=common/home">Home</a>
         » <a href="http://template-preview.com/opencart/300111402/index.php?route=checkout/cart">Shopping Cart</a>
         » <a href="http://template-preview.com/opencart/300111402/index.php?route=checkout/checkout">Checkout</a>
      </div>
  
  <div class="checkout">
    <div id="checkout">
      <div class="checkout-heading">Step 1: Checkout Options</div>
      <div style="display: block;" class="checkout-content"><div class="left">
  <h2>New Customer</h2>
  <p>Checkout Options:</p>
  <label for="register">
        <input name="account" value="register" id="register" checked="checked" type="radio">
        <b>Register Account</b></label>
  <br>
    <label for="guest">
        <input name="account" value="guest" id="guest" type="radio">
        <b>Guest Checkout</b></label>
  <br>
    <br>
  <p>By creating an account you will be able to shop faster, be up to 
date on an order's status, and keep track of the orders you have 
previously made.</p>
  <a id="button-account" class="button"><span>Continue</span></a><br>
  <br>
</div>
<div id="login" class="right">
  <h2>Returning Customer</h2>
  <p>I am a returning customer</p>
  <b>E-Mail:</b><br>
  <input name="email" type="text">
  <br>
  <br>
  <b>Password:</b><br>
  <input name="password" value="" type="password">
  <br>
  <a href="http://template-preview.com/opencart/300111402/index.php?route=account/forgotten">Forgotten Password</a><br>
  <br>
  <a id="button-login" class="button"><span>Login</span></a><br>
  <br>
</div>
   </div>
    </div>
        <div id="payment-address">
      <div class="checkout-heading"><span>Step 2: Account &amp; Billing Details</span></div>
      <div class="checkout-content"></div>
    </div>
            <div id="shipping-address">
      <div class="checkout-heading">Step 3: Delivery Details</div>
      <div class="checkout-content"></div>
    </div>
    <div id="shipping-method">
      <div class="checkout-heading">Step 4: Delivery Method</div>
      <div class="checkout-content"></div>
    </div>
        <div id="payment-method">
      <div class="checkout-heading">Step 5: Payment Method</div>
      <div class="checkout-content"></div>
    </div>
    <div id="confirm">
      <div class="checkout-heading">Step 6: Confirm Order</div>
      <div class="checkout-content"></div>
    </div>
  </div>
    <div style="clear:both; padding-bottom:1px"></div></span></div>
<script type="text/javascript"><!--
$('#checkout .checkout-content input[name=\'account\']').live('change', function() {
	if ($(this).attr('value') == 'register') {
		$('#payment-address .checkout-heading span').html('Step 2: Account &amp; Billing Details');
	} else {
		$('#payment-address .checkout-heading span').html('Step 2: Billing Details');
	}
});

$('.checkout-heading a').live('click', function() {
	$('.checkout-content').slideUp('slow');
	
	$(this).parent().parent().find('.checkout-content').slideDown('slow');
});
 
$(document).ready(function() {
	$.ajax({
		url: 'index.php?route=checkout/login',
		dataType: 'json',
		success: function(json) {
			if (json['redirect']) {
				location = json['redirect'];
			}
			
			if (json['output']) {		
				$('#checkout .checkout-content').html(json['output']);
				
				$('#checkout .checkout-content').slideDown('slow');
			}
		}
	});	
});		

// Checkout
$('#button-account').live('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/' + $('input[name=\'account\']:checked').attr('value'),
		dataType: 'json',
		beforeSend: function() {
			$('#button-account').attr('disabled', true);
			$('#button-account').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
		},		
		complete: function() {
			$('#button-account').attr('disabled', false);
			$('.wait').remove();
		},			
		success: function(json) {
			$('.warning').remove();
			
			if (json['redirect']) {
				location = json['redirect'];
			}
			
			if (json['output']) {			
				$('#payment-address .checkout-content').html(json['output']);
				
				$('#checkout .checkout-content').slideUp('slow');
				
				$('#payment-address .checkout-content').slideDown('slow');
				
				$('.checkout-heading a').remove();
				
				$('#checkout .checkout-heading').append('<a>Modify &raquo;</a>');
			}
		}
	});
});

// Login
$('#button-login').live('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/login',
		type: 'post',
		data: $('#checkout #login :input'),
		dataType: 'json',
		beforeSend: function() {
			$('#button-login').attr('disabled', true);
			$('#button-login').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
		},	
		complete: function() {
			$('#button-login').attr('disabled', false);
			$('.wait').remove();
		},				
		success: function(json) {
			$('.warning').remove();
			
			if (json['redirect']) {
				location = json['redirect'];
			}
			
			if (json['total']) {
				$('#cart_total').html(json['total']);
			}
			
			if (json['logged']) {
				$('#welcome').html(json['logged']);
			}
						
			if (json['error']) {
				$('#checkout .checkout-content').prepend('<div class="warning" style="display: none;">' + json['error']['warning'] + '</div>');
				
				$('.warning').fadeIn('slow');
			} else {								
				$.ajax({
					url: 'index.php?route=checkout/address/payment',
					dataType: 'json',
					success: function(json) {
						if (json['redirect']) {
							location = json['redirect'];
						}						
						
						if (json['output']) {
							$('#payment-address .checkout-content').html(json['output']);
							
							$('#checkout .checkout-content').slideUp('slow');
							
							$('#payment-address .checkout-content').slideDown('slow');
							
							$('#payment-address .checkout-heading span').html('Step 2: Billing Details');
							
							$('.checkout-heading a').remove();
						}
					}
				});	
			}
		}
	});	
});

// Register
$('#button-register').live('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/register',
		type: 'post',
		data: $('#payment-address input[type=\'text\'], #payment-address input[type=\'password\'], #payment-address input[type=\'checkbox\']:checked, #payment-address input[type=\'radio\']:checked, #payment-address select'),
		dataType: 'json',
		beforeSend: function() {
			$('#button-register').attr('disabled', true);
			$('#button-register').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
		},	
		complete: function() {
			$('#button-register').attr('disabled', false); 
			$('.wait').remove();
		},			
		success: function(json) {
			$('.warning').remove();
			$('.error').remove();
						
			if (json['redirect']) {
				location = json['redirect'];
			}
						
			if (json['error']) {
				if (json['error']['warning']) {
					$('#payment-address .checkout-content').prepend('<div class="warning" style="display: none;">' + json['error']['warning'] + '</div>');
					
					$('.warning').fadeIn('slow');
				}
				
				if (json['error']['firstname']) {
					$('#payment-address input[name=\'firstname\'] + br').after('<span class="error">' + json['error']['firstname'] + '</span>');
				}
				
				if (json['error']['lastname']) {
					$('#payment-address input[name=\'lastname\'] + br').after('<span class="error">' + json['error']['lastname'] + '</span>');
				}	
				
				if (json['error']['email']) {
					$('#payment-address input[name=\'email\'] + br').after('<span class="error">' + json['error']['email'] + '</span>');
				}
				
				if (json['error']['telephone']) {
					$('#payment-address input[name=\'telephone\'] + br').after('<span class="error">' + json['error']['telephone'] + '</span>');
				}		
										
				if (json['error']['address_1']) {
					$('#payment-address input[name=\'address_1\'] + br').after('<span class="error">' + json['error']['address_1'] + '</span>');
				}	
				
				if (json['error']['city']) {
					$('#payment-address input[name=\'city\'] + br').after('<span class="error">' + json['error']['city'] + '</span>');
				}	
				
				if (json['error']['postcode']) {
					$('#payment-address input[name=\'postcode\'] + br').after('<span class="error">' + json['error']['postcode'] + '</span>');
				}	
				
				if (json['error']['country']) {
					$('#payment-address select[name=\'country_id\'] + br').after('<span class="error">' + json['error']['country'] + '</span>');
				}	
				
				if (json['error']['zone']) {
					$('#payment-address select[name=\'zone_id\'] + br').after('<span class="error">' + json['error']['zone'] + '</span>');
				}
				
				if (json['error']['password']) {
					$('#payment-address input[name=\'password\'] + br').after('<span class="error">' + json['error']['password'] + '</span>');
				}	
				
				if (json['error']['confirm']) {
					$('#payment-address input[name=\'confirm\'] + br').after('<span class="error">' + json['error']['confirm'] + '</span>');
				}																																	
			} else {
								
				var shipping_address = $('#payment-address input[name=\'shipping_address\']:checked').attr('value');
				
				if (shipping_address) {
					$.ajax({
						url: 'index.php?route=checkout/shipping',
						dataType: 'json',
						success: function(json) {
							if (json['redirect']) {
								location = json['redirect'];
							}
														
							if (json['output']) {
								$('#shipping-method .checkout-content').html(json['output']);
								
								$('#payment-address .checkout-content').slideUp('slow');
								
								$('#shipping-method .checkout-content').slideDown('slow');
								
								$('#checkout .checkout-heading a').remove();
								$('#payment-address .checkout-heading a').remove();
								$('#shipping-address .checkout-heading a').remove();
								$('#shipping-method .checkout-heading a').remove();
								$('#payment-method .checkout-heading a').remove();											
								
								$('#shipping-address .checkout-heading').append('<a>Modify &raquo;</a>');									
								$('#payment-address .checkout-heading').append('<a>Modify &raquo;</a>');	
	
								$.ajax({
									url: 'index.php?route=checkout/address/shipping',
									dataType: 'json',
									success: function(json) {
										if (json['redirect']) {
											location = json['redirect'];
										}										
										
										if (json['output']) {
											$('#shipping-address .checkout-content').html(json['output']);
										}
									}
								});	
							}
						}
					});	
				} else {
					$.ajax({
						url: 'index.php?route=checkout/address/shipping',
						dataType: 'json',
						success: function(json) {
							if (json['redirect']) {
								location = json['redirect'];
							}
										
							if (json['output']) {
								$('#shipping-address .checkout-content').html(json['output']);
								
								$('#payment-address .checkout-content').slideUp('slow');
								
								$('#shipping-address .checkout-content').slideDown('slow');
								
								$('#checkout .checkout-heading a').remove();
								$('#payment-address .checkout-heading a').remove();
								$('#shipping-address .checkout-heading a').remove();
								$('#shipping-method .checkout-heading a').remove();
								$('#payment-method .checkout-heading a').remove();							

								$('#payment-address .checkout-heading').append('<a>Modify &raquo;</a>');	
							}
						}
					});			
				}
								
				$.ajax({
					url: 'index.php?route=checkout/address/payment',
					dataType: 'json',
					success: function(json) {
						if (json['redirect']) {
							location = json['redirect'];
						}
									
						if (json['output']) {
							$('#payment-address .checkout-content').html(json['output']);
							
							$('#payment-address .checkout-heading span').html('Step 2: Billing Details');
						}
					}
				});
			}	 
		}
	});	
});

// Payment Address	
$('#payment-address #button-address').live('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/address/payment',
		type: 'post',
		data: $('#payment-address input[type=\'text\'], #payment-address input[type=\'password\'], #payment-address input[type=\'checkbox\']:checked, #payment-address input[type=\'radio\']:checked, #payment-address select'),
		dataType: 'json',
		beforeSend: function() {
			$('#payment-address #button-address').attr('disabled', true);
			$('#payment-address #button-address').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
		},	
		complete: function() {
			$('#payment-address #button-address').attr('disabled', false);
			$('.wait').remove();
		},			
		success: function(json) {
			$('.error').remove();
			
			if (json['redirect']) {
				location = json['redirect'];
			}
			
			if (json['error']) {
				if (json['error']['firstname']) {
					$('#payment-address input[name=\'firstname\']').after('<span class="error">' + json['error']['firstname'] + '</span>');
				}
				
				if (json['error']['lastname']) {
					$('#payment-address input[name=\'lastname\']').after('<span class="error">' + json['error']['lastname'] + '</span>');
				}	
				
				if (json['error']['telephone']) {
					$('#payment-address input[name=\'telephone\']').after('<span class="error">' + json['error']['telephone'] + '</span>');
				}		
										
				if (json['error']['address_1']) {
					$('#payment-address input[name=\'address_1\']').after('<span class="error">' + json['error']['address_1'] + '</span>');
				}	
				
				if (json['error']['city']) {
					$('#payment-address input[name=\'city\']').after('<span class="error">' + json['error']['city'] + '</span>');
				}	
				
				if (json['error']['postcode']) {
					$('#payment-address input[name=\'postcode\']').after('<span class="error">' + json['error']['postcode'] + '</span>');
				}	
				
				if (json['error']['country']) {
					$('#payment-address select[name=\'country_id\']').after('<span class="error">' + json['error']['country'] + '</span>');
				}	
				
				if (json['error']['zone']) {
					$('#payment-address select[name=\'zone_id\']').after('<span class="error">' + json['error']['zone'] + '</span>');
				}
			} else {
								$.ajax({
					url: 'index.php?route=checkout/address/shipping',
					dataType: 'json',
					success: function(json) {
						if (json['redirect']) {
							location = json['redirect'];
						}
									
						if (json['output']) {
							$('#shipping-address .checkout-content').html(json['output']);
						
							$('#payment-address .checkout-content').slideUp('slow');
							
							$('#shipping-address .checkout-content').slideDown('slow');
							
							$('#payment-address .checkout-heading a').remove();
							$('#shipping-address .checkout-heading a').remove();
							$('#shipping-method .checkout-heading a').remove();
							$('#payment-method .checkout-heading a').remove();
							
							$('#payment-address .checkout-heading').append('<a>Modify &raquo;</a>');	
						}
					}
				});
								
				$.ajax({
					url: 'index.php?route=checkout/address/payment',
					dataType: 'json',
					success: function(json) {
						if (json['redirect']) {
							location = json['redirect'];
						}
									
						if (json['output']) {
							$('#payment-address .checkout-content').html(json['output']);
						}
					}
				});					
			}	  
		}
	});	
});

// Shipping Address			
$('#shipping-address #button-address').live('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/address/shipping',
		type: 'post',
		data: $('#shipping-address input[type=\'text\'], #shipping-address input[type=\'password\'], #shipping-address input[type=\'checkbox\']:checked, #shipping-address input[type=\'radio\']:checked, #shipping-address select'),
		dataType: 'json',
		beforeSend: function() {
			$('#shipping-address #button-address').attr('disabled', true);
			$('#shipping-address #button-address').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
		},	
		complete: function() {
			$('#shipping-address #button-address').attr('disabled', false);
			$('.wait').remove();
		},			
		success: function(json) {
			$('.error').remove();
			
			if (json['redirect']) {
				location = json['redirect'];
			}
			
			if (json['error']) {
				if (json['error']['firstname']) {
					$('#shipping-address input[name=\'firstname\']').after('<span class="error">' + json['error']['firstname'] + '</span>');
				}
				
				if (json['error']['lastname']) {
					$('#shipping-address input[name=\'lastname\']').after('<span class="error">' + json['error']['lastname'] + '</span>');
				}	
				
				if (json['error']['email']) {
					$('#shipping-address input[name=\'email\']').after('<span class="error">' + json['error']['email'] + '</span>');
				}
				
				if (json['error']['telephone']) {
					$('#shipping-address input[name=\'telephone\']').after('<span class="error">' + json['error']['telephone'] + '</span>');
				}		
										
				if (json['error']['address_1']) {
					$('#shipping-address input[name=\'address_1\']').after('<span class="error">' + json['error']['address_1'] + '</span>');
				}	
				
				if (json['error']['city']) {
					$('#shipping-address input[name=\'city\']').after('<span class="error">' + json['error']['city'] + '</span>');
				}	
				
				if (json['error']['postcode']) {
					$('#shipping-address input[name=\'postcode\']').after('<span class="error">' + json['error']['postcode'] + '</span>');
				}	
				
				if (json['error']['country']) {
					$('#shipping-address select[name=\'country_id\']').after('<span class="error">' + json['error']['country'] + '</span>');
				}	
				
				if (json['error']['zone']) {
					$('#shipping-address select[name=\'zone_id\']').after('<span class="error">' + json['error']['zone'] + '</span>');
				}
			} else {
				$.ajax({
					url: 'index.php?route=checkout/shipping',
					dataType: 'json',
					success: function(json) {
						if (json['redirect']) {
							location = json['redirect'];
						}
									
						if (json['output']) {
							$('#shipping-method .checkout-content').html(json['output']);
							
							$('#shipping-address .checkout-content').slideUp('slow');
							
							$('#shipping-method .checkout-content').slideDown('slow');
							
							$('#shipping-address .checkout-heading a').remove();
							$('#shipping-method .checkout-heading a').remove();
							$('#payment-method .checkout-heading a').remove();
							
							$('#shipping-address .checkout-heading').append('<a>Modify &raquo;</a>');							
						}
						
						$.ajax({
							url: 'index.php?route=checkout/address/shipping',
							dataType: 'json',
							success: function(json) {
								if (json['redirect']) {
									location = json['redirect'];
								}	
													
								if (json['output']) {
									$('#shipping-address .checkout-content').html(json['output']);
								}
							}
						});						
					}
				});	
			}  
		}
	});	
});

// Guest
$('#button-guest').live('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/guest',
		type: 'post',
		data: $('#payment-address input[type=\'text\'], #payment-address input[type=\'checkbox\']:checked, #payment-address select'),
		dataType: 'json',
		beforeSend: function() {
			$('#button-guest').attr('disabled', true);
			$('#button-guest').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
		},	
		complete: function() {
			$('#button-guest').attr('disabled', false); 
			$('.wait').remove();
		},			
		success: function(json) {
			$('.error').remove();
			
			if (json['redirect']) {
				location = json['redirect'];
			}
			
			if (json['error']) {
				if (json['error']['firstname']) {
					$('#payment-address input[name=\'firstname\'] + br').after('<span class="error">' + json['error']['firstname'] + '</span>');
				}
				
				if (json['error']['lastname']) {
					$('#payment-address input[name=\'lastname\'] + br').after('<span class="error">' + json['error']['lastname'] + '</span>');
				}	
				
				if (json['error']['email']) {
					$('#payment-address input[name=\'email\'] + br').after('<span class="error">' + json['error']['email'] + '</span>');
				}
				
				if (json['error']['telephone']) {
					$('#payment-address input[name=\'telephone\'] + br').after('<span class="error">' + json['error']['telephone'] + '</span>');
				}		
										
				if (json['error']['address_1']) {
					$('#payment-address input[name=\'address_1\'] + br').after('<span class="error">' + json['error']['address_1'] + '</span>');
				}	
				
				if (json['error']['city']) {
					$('#payment-address input[name=\'city\'] + br').after('<span class="error">' + json['error']['city'] + '</span>');
				}	
				
				if (json['error']['postcode']) {
					$('#payment-address input[name=\'postcode\'] + br').after('<span class="error">' + json['error']['postcode'] + '</span>');
				}	
				
				if (json['error']['country']) {
					$('#payment-address select[name=\'country_id\'] + br').after('<span class="error">' + json['error']['country'] + '</span>');
				}	
				
				if (json['error']['zone']) {
					$('#payment-address select[name=\'zone_id\'] + br').after('<span class="error">' + json['error']['zone'] + '</span>');
				}
			} else {
					
				var shipping_address = $('#payment-address input[name=\'shipping_address\']:checked').attr('value');
				
				if (shipping_address) {
					$.ajax({
						url: 'index.php?route=checkout/shipping',
						dataType: 'json',
						success: function(json) {
							if (json['redirect']) {
								location = json['redirect'];
							}
										
							if (json['output']) {
								$('#shipping-method .checkout-content').html(json['output']);
								
								$('#payment-address .checkout-content').slideUp('slow');
								
								$('#shipping-method .checkout-content').slideDown('slow');
								
								$('#payment-address .checkout-heading a').remove();
								$('#shipping-address .checkout-heading a').remove();
								$('#shipping-method .checkout-heading a').remove();
								$('#payment-method .checkout-heading a').remove();		
																
								$('#payment-address .checkout-heading').append('<a>Modify &raquo;</a>');	
								$('#shipping-address .checkout-heading').append('<a>Modify &raquo;</a>');									
							}
							
							$.ajax({
								url: 'index.php?route=checkout/guest/shipping',
								dataType: 'json',
								success: function(json) {
									if (json['redirect']) {
										location = json['redirect'];
									}
												
									if (json['output']) {
										$('#shipping-address .checkout-content').html(json['output']);
									}
								}
							});
						}
					});					
				} else {
					$.ajax({
						url: 'index.php?route=checkout/guest/shipping',
						dataType: 'json',
						success: function(json) {
							if (json['redirect']) {
								location = json['redirect'];
							}	
													
							if (json['output']) {
								$('#shipping-address .checkout-content').html(json['output']);
								
								$('#payment-address .checkout-content').slideUp('slow');
								
								$('#shipping-address .checkout-content').slideDown('slow');
								
								$('#payment-address .checkout-heading a').remove();
								$('#shipping-address .checkout-heading a').remove();
								$('#shipping-method .checkout-heading a').remove();
								$('#payment-method .checkout-heading a').remove();
								
								$('#payment-address .checkout-heading').append('<a>Modify &raquo;</a>');	
							}
						}
					});
				}
							}	 
		}
	});	
});

// Guest Shipping
$('#button-guest-shipping').live('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/guest/shipping',
		type: 'post',
		data: $('#shipping-address input[type=\'text\'], #shipping-address select'),
		dataType: 'json',
		beforeSend: function() {
			$('#button-guest-shipping').attr('disabled', true);
			$('#button-guest-shipping').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
		},	
		complete: function() {
			$('#button-guest-shipping').attr('disabled', false); 
			$('.wait').remove();
		},			
		success: function(json) {
			$('.error').remove();
			
			if (json['redirect']) {
				location = json['redirect'];
			}
			
			if (json['error']) {
				if (json['error']['firstname']) {
					$('#shipping-address input[name=\'firstname\']').after('<span class="error">' + json['error']['firstname'] + '</span>');
				}
				
				if (json['error']['lastname']) {
					$('#shipping-address input[name=\'lastname\']').after('<span class="error">' + json['error']['lastname'] + '</span>');
				}	
										
				if (json['error']['address_1']) {
					$('#shipping-address input[name=\'address_1\']').after('<span class="error">' + json['error']['address_1'] + '</span>');
				}	
				
				if (json['error']['city']) {
					$('#shipping-address input[name=\'city\']').after('<span class="error">' + json['error']['city'] + '</span>');
				}	
				
				if (json['error']['postcode']) {
					$('#shipping-address input[name=\'postcode\']').after('<span class="error">' + json['error']['postcode'] + '</span>');
				}	
				
				if (json['error']['country']) {
					$('#shipping-address select[name=\'country_id\']').after('<span class="error">' + json['error']['country'] + '</span>');
				}	
				
				if (json['error']['zone']) {
					$('#shipping-address select[name=\'zone_id\']').after('<span class="error">' + json['error']['zone'] + '</span>');
				}
			} else {
				$.ajax({
					url: 'index.php?route=checkout/shipping',
					dataType: 'json',
					success: function(json) {
						if (json['redirect']) {
							location = json['redirect'];
						}
									
						if (json['output']) {
							$('#shipping-method .checkout-content').html(json['output']);
							
							$('#shipping-address .checkout-content').slideUp('slow');
							
							$('#shipping-method .checkout-content').slideDown('slow');
							
							$('#shipping-address .checkout-heading a').remove();
							$('#shipping-method .checkout-heading a').remove();
							$('#payment-method .checkout-heading a').remove();
								
							$('#shipping-address .checkout-heading').append('<a>Modify &raquo;</a>');
						}
					}
				});				
			}	 
		}
	});	
});

$('#button-shipping').live('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/shipping',
		type: 'post',
		data: $('#shipping-method input[type=\'radio\']:checked, #shipping-method textarea'),
		dataType: 'json',
		beforeSend: function() {
			$('#button-shipping').attr('disabled', true);
			$('#button-shipping').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
		},	
		complete: function() {
			$('#button-shipping').attr('disabled', false);
			$('.wait').remove();
		},			
		success: function(json) {
			$('.warning').remove();
			
			if (json['redirect']) {
				location = json['redirect'];
			}
			
			if (json['error']) {
				if (json['error']['warning']) {
					$('#shipping-method .checkout-content').prepend('<div class="warning" style="display: none;">' + json['error']['warning'] + '</div>');
					
					$('.warning').fadeIn('slow');
				}			
			} else {
				$.ajax({
					url: 'index.php?route=checkout/payment',
					dataType: 'json',
					success: function(json) {
						if (json['redirect']) {
							location = json['redirect'];
						}
												
						if (json['output']) {
							$('#payment-method .checkout-content').html(json['output']);
							
							$('#shipping-method .checkout-content').slideUp('slow');
							
							$('#payment-method .checkout-content').slideDown('slow');

							$('#shipping-method .checkout-heading a').remove();
							$('#payment-method .checkout-heading a').remove();
							
							$('#shipping-method .checkout-heading').append('<a>Modify &raquo;</a>');	
						}
					},
					error: function(xhr, ajaxOptions, thrownError) {
						alert(thrownError);
					}
				});					
			}
		}
	});	
});

$('#button-payment').live('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/payment', 
		type: 'post',
		data: $('#payment-method input[type=\'radio\']:checked, #payment-method input[type=\'checkbox\']:checked, #payment-method textarea'),
		dataType: 'json',
		beforeSend: function() {
			$('#button-payment').attr('disabled', true);
			$('#button-payment').after('<span class="wait">&nbsp;<img src="catalog/view/theme/default/image/loading.gif" alt="" /></span>');
		},	
		complete: function() {
			$('#button-payment').attr('disabled', false);
			$('.wait').remove();
		},			
		success: function(json) {
			$('.warning').remove();
			
			if (json['redirect']) {
				location = json['redirect'];
			}
			
			if (json['error']) {
				if (json['error']['warning']) {
					$('#payment-method .checkout-content').prepend('<div class="warning" style="display: none;">' + json['error']['warning'] + '</div>');
					
					$('.warning').fadeIn('slow');
				}			
			} else {
				$.ajax({
					url: 'index.php?route=checkout/confirm',
					dataType: 'json',
					success: function(json) {
						if (json['redirect']) {
							location = json['redirect'];
						}	
					
						if (json['output']) {
							$('#confirm .checkout-content').html(json['output']);
							
							$('#payment-method .checkout-content').slideUp('slow');
							
							$('#confirm .checkout-content').slideDown('slow');
							
							$('#payment-method .checkout-heading a').remove();
							
							$('#payment-method .checkout-heading').append('<a>Modify &raquo;</a>');	
						}
					},
					error: function(xhr, ajaxOptions, thrownError) {
						alert(thrownError);
					}
				});					
			}
		}
	});	
});
//--></script> 
<div style="clear:both"></div>
</div><!--   END  bg_content  -->

</div><!--   END  container  -->

<div id="footer">
	<div class="centr">
	  <div class="column">
		<h3>Information</h3>
		<ul>
		  		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=information/information&amp;information_id=4">About Us</a></li>
		  		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=information/information&amp;information_id=6">Delivery Information</a></li>
		  		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=information/information&amp;information_id=3">Privacy Policy</a></li>
		  		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=information/information&amp;information_id=5">Terms &amp; Conditions</a></li>
		  		</ul>
	  </div>
	  <div class="column">
		<h3>Customer Service</h3>
		<ul>
		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=information/contact">Contact Us</a></li>
		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=account/return/insert">Returns</a></li>
		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=information/sitemap">Site Map</a></li>
		</ul>
	  </div>
	  <div class="column">
		<h3>Extras</h3>
		<ul>
		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=product/manufacturer">Brands</a></li>
		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=checkout/voucher">Gift Vouchers</a></li>
		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=affiliate/account">Affiliates</a></li>
		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=product/special">Specials</a></li>
		</ul>
	  </div>
	  <div class="column">
		<h3>My Account</h3>
		<ul>
		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=account/account">My Account</a></li>
		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=account/order">Order History</a></li>
		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=account/wishlist">Wish List</a></li>
		  <li><a href="http://template-preview.com/opencart/300111402/index.php?route=account/newsletter">Newsletter</a></li>
		</ul>
	  </div>
	  <div id="powered">
		<div class="social right_20">
			<a style="opacity: 0.5;" href="#" class="_1"></a>
			<a style="opacity: 0.5;" href="#" class="_2"></a>
			<a style="opacity: 0.5;" href="#" class="_3"></a>
		</div><br>
		Powered By <a href="http://www.opencart.com/">OpenCart</a><br> Your Store © 2013<br><br>
		<div class="pay_pall_img"></div>
	  </div>
  </div>
</div>

</div> <!--end bg_top-->
</div> <!--end bg_bottom-->
<div id="fancybox-tmp"></div><div id="fancybox-loading"><div></div></div><div id="fancybox-overlay"></div><div id="fancybox-wrap"><div id="fancybox-outer"><div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div><div id="fancybox-content"></div><a id="fancybox-close"></a><div id="fancybox-title"></div><a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a><a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a></div></div></body></html>